package br.com.softwareevaluation.dao;

import java.sql.Connection;
import java.sql.SQLException;

import br.com.softwareevaluation.exceptions.DAOException;

public abstract class AbstractDAO {
	
	private Connection connection;

	public AbstractDAO(Connection connection) {
		super();
		this.connection = connection;
	}

	protected Connection getConnection() {
		return connection;
	}
	
	public void closeConnection() throws DAOException {
		try {
			connection.close();
		} catch (SQLException e) {
			throw new DAOException(e);
		}
	}
}